package com.design.observe;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Observer1 implements Observer{

    private Subject subject;
    public Observer1(Subject subject){
        this.subject=subject;
        subject.registerObserver(this);
    }


    @Override
    public void update(String msg) {
        log.info("Observer 1 rcv msg:{}",msg);
    }
}
